package com.frogs.ucenter.v1.request;

import javax.servlet.http.HttpServletRequest;

import com.frogs.framework.web.HttpRequestInfo;
import com.frogs.system.util.ApiUrlParamEnum;
import com.frogs.system.util.SeedLookStatusEnum;
import com.frogs.system.util.SeedPayStatusEnum;
import com.frogs.system.web.api.request.Request;

public class SeedRequest extends Request {
	
	
	 /**
	 * 
	 */
	private static final long serialVersionUID = 1105713745779334436L;
	
	private String openId;
	 private Integer userId = 0;
	 private String wechatAccount;
	 private String wechatNickName;
	 private String subjectId;
	 private Integer isLook = 0;
	 private Integer isPay = 0;
	 
	 public SeedRequest(){ 
		 
	 }
	 
	 @Override
		public void parse(HttpServletRequest request){
		 HttpRequestInfo requestInfo = new HttpRequestInfo(request);
		 this.userId = requestInfo.getIntParameter(ApiUrlParamEnum.userId.getParamName(), 0);
		this.openId = requestInfo.getParameter(ApiUrlParamEnum.openId.getParamName(),null);
		this.wechatAccount = requestInfo.getParameter(ApiUrlParamEnum.wechatAccount.getParamName(),null);
		this.wechatNickName = requestInfo.getParameter(ApiUrlParamEnum.nickName.getParamName(),null);
		this.subjectId = requestInfo.getParameter(ApiUrlParamEnum.subjectId.getParamName(),null);
		this.isLook = requestInfo.getIntParameter(ApiUrlParamEnum.isLook.getParamName() ,SeedLookStatusEnum.STATUS_LOOK.getId() );
		this.isPay = requestInfo.getIntParameter(ApiUrlParamEnum.isPay.getParamName(), SeedPayStatusEnum.STATUS_NOT_PAY.getId());
	 }

	public String getOpenId() {
		return openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getWechatAccount() {
		return wechatAccount;
	}

	public void setWechatAccount(String wechatAccount) {
		this.wechatAccount = wechatAccount;
	}

	public String getWechatNickName() {
		return wechatNickName;
	}

	public void setWechatNickName(String wechatNickName) {
		this.wechatNickName = wechatNickName;
	}

	public String getSubjectId() {
		return subjectId;
	}

	public void setSubjectId(String subjectId) {
		this.subjectId = subjectId;
	}

	public Integer getIsLook() {
		return isLook;
	}

	public void setIsLook(Integer isLook) {
		this.isLook = isLook;
	}

	public Integer getIsPay() {
		return isPay;
	}

	public void setIsPay(Integer isPay) {
		this.isPay = isPay;
	}
}
